﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:$safeprojectname$"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
    xmlns:core="using:Microsoft.Xaml.Interactions.Core"
    x:Class="$safeprojectname$.CustomerView"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

	<Grid DataContext="{Binding CustomerViewModel, Source={StaticResource Locator}}">
		<Grid.ColumnDefinitions>
			<ColumnDefinition/>
			<ColumnDefinition/>
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition/>
			<RowDefinition/>
			<RowDefinition/>
			<RowDefinition/>
		</Grid.RowDefinitions>
		<TextBlock Text="Customer Id:" Grid.Row="0" VerticalAlignment="Center" FontSize="18.667" />
		<TextBox Grid.Row="0" Grid.Column="1" Height="30"
			Text="{Binding Model.CustomerId}" FontSize="18.667" />
		<TextBlock Text="Customer Name:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" FontSize="18.667" />
		<TextBox Grid.Row="1" Grid.Column="1" Height="30"
			Text="{Binding Model.CustomerName}" FontSize="18.667" />
		<TextBlock Text="Customer City:" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" FontSize="18.667" />
		<TextBox Grid.Row="2" Grid.Column="1" Height="30"
			Text="{Binding Model.City}" FontSize="18.667" />
		<Button Content="New Customer" Grid.Row="3" Grid.ColumnSpan="2" Grid.Column="0"
			Height="50" Width="200" HorizontalAlignment="Center" FontSize="18.667">
			<interactivity:Interaction.Behaviors>
				<core:EventTriggerBehavior EventName="Click">
                    <core:CallMethodAction
                        TargetObject="{Binding}"
                        MethodName="NewCustomer"/>
				</core:EventTriggerBehavior>
			</interactivity:Interaction.Behaviors>
		</Button>    
	</Grid>
</UserControl>
